package com.sfh.service.model;

import java.util.Date;

import com.jfinal.plugin.activerecord.Model;
import com.sfh.service.model.table.VIPCodeTable;

/***
 * 激活码
 * @author Swer
 *
 */
public class VIPCodeModel extends Model<VIPCodeModel> {

	private static final long serialVersionUID = 6037792970863437487L;
	public static final VIPCodeModel VIP_CODE = new VIPCodeModel().dao();
	
	@Override
	public VIPCodeModel findById(Object idValue) {
		return super.findFirst("select * from "+VIPCodeTable.Table+" where "+VIPCodeTable.id+"=?", idValue);
	}
	
	public long getId() {
		return this.getLong(VIPCodeTable.id.toString());
	}
	public void setId(long id) {
		this.set(VIPCodeTable.id.toString(),  id);
	}
	
	public long getUserId() {
		return this.get(VIPCodeTable.userId.toString());
	}
	public void setUserId(long userId) {
		this.set(VIPCodeTable.userId.toString(), userId);
	}
	
	public String getCode() {
		return this.get(VIPCodeTable.code.toString());
	}
	public void setCode(String code) {
		this.set(VIPCodeTable.code.toString(), code);
	}
	
	public Date getUseTime() {
		return this.get(VIPCodeTable.useTime.toString());
	}
	public void setUseTime(Date useTime) {
		this.set(VIPCodeTable.useTime.toString(), useTime);
	}
	
	public Date getTime() {
		return this.get(VIPCodeTable.time.toString());
	}
	public void setTime(Date time) {
		this.set(VIPCodeTable.time.toString(), time);
	}
	
	public long getVersion() {
		return this.getLong(VIPCodeTable.version.toString());
	}
	public void setVersion(long version) {
		this.set(VIPCodeTable.version.toString(), version);
	}

	public long getServiceTime() {
		return this.getLong(VIPCodeTable.serviceTime.toString());
	}
	public void setServiceTime(long serviceTime) {
		this.set(VIPCodeTable.serviceTime.toString(), serviceTime);
	}
	
}
